<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>我的余额</title>
        <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
        <meta content="yes" name="apple-mobile-web-app-capable"/>
        <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
        <meta content="telephone=no" name="format-detection"/>
        <link href="../css/styleyue.css" rel="stylesheet" type="text/css"/>
    </head>

    <body>
<header  class="ui_button"></header>
        <section class="aui-flexView">
            <header class="aui-navBar aui-navBar-fixed">
                <a onclick="closeWin()" class="aui-navBar-item">
                    <i class="icon icon-return"></i>
                </a>
                
                <div class="aui-center">
                    <span class="aui-center-title"></span>
                </div>
                
            </header>
            <section class="aui-scrollView">
                <div class="aui-line-box">
                    <div class="aui-line-circle">
                        <h2>可用余额</h2>
                        <p>
                            <em>￥</em>
                            <a id="sign">5.23.89</a>
                        </p>
                    </div>
                    <div class="aui-line-text">
                        <p>
                            <i class="aui-line-blue"></i>
                            其中可提现余额: <em>￥<a id="sign1">5.23.89</a></em>
                            <i class="aui-line-mark"></i>
                        </p>
                    </div>
                </div>
                <div class="aui-cells">
                    <a tapmode onclick="openWin('shoukuanma_win')" class="aui-cells-cell">
                        <div class="aui-cell-hd">
                            <h4>上传收款码</h4>
                            <p>免费手续费,安全便捷</p>
                        </div>
                        <span class="aui-cell-fr"></span>
                    </a>
                    <a tapmode onclick="openWin('share_win')" class="aui-cells-cell">
                        <div class="aui-cell-hd">
                            <h4>赚钱</h4>
                            <p>赚钱无上限</p>
                        </div>
                        <span class="aui-cell-fr">去赚钱</span>
                    </a>
                    <a tapmode onclick="totxjl()" class="aui-cells-cell">
                        <div class="aui-cell-hd">
                            <h4>提现记录</h4>
                            <p>查看历史收益</p>
                        </div>
                        <span class="aui-cell-fr">看收益</span>
                    </a>
                </div>
            </section>
            <footer class="aui-footer">
                <a tapmode onclick="openWin('qianbao_win')" class="aui-forward">提现</a>
                <a tapmode onclick="openWin('chongzhi')" class="aui-recharge">充值</a>
            </footer>
        </section>
    </body>
    
    
    
    <script type="text/javascript" src="../script/api.js" ></script>
    <script type="text/javascript">
  var api_url = localStorage.getItem('api_url');



  apiready = function(){
    api.parseTapmode();
    api.showProgress({
        title: '正在刷新',
        text: '请稍等...',
        modal: false
    });
    api.ajax({
        url: api_url+'login/login/yue1.html',
        method: 'get',
        data: {
            values: {
                uid: localStorage.getItem('user_id')
            }
        }
    },function(ret, err){
        if (ret) {
            var sign = $api.byId('sign');
            sign.innerHTML = ret.msg['share'];
            var sign1 = $api.byId('sign1');
            sign1.innerHTML = ret.msg['share'];
        } else {
          api.hideProgress();
            alert('网络错误11');
        }
    });
   
     }



  //重新获取到期时间
  function getTime(){
    api.ajax({
        url: api_url+'login/login/logo.html',
        method: 'get',
        data: {
            values: {
                username: localStorage.getItem('user_name'),
                passwd: localStorage.getItem('password'),
                imei:api.deviceId,
				kjdl:localStorage.getItem('kjdl'),
            }
        }
    },function(ret, err){
        if (ret) {
          if (ret.code == 0) {
            api.hideProgress();
            alert('不明错误 请重新登录');
          }else if (ret.code == 1) {
              localStorage.setItem('user_time',ret.msg['time']);
              api.sendEvent({
                name: 'newLoingdata',
                extra: {
                }
              });
          }
        } else {
          api.hideProgress();
          alert('网络错误！33');
        }
    });
  }



  function totxjl(){
  	if (localStorage.getItem('user_id')>0) {
  			api.openWin({
  				name: 'txjl_win',
  				url: './txjl_win.html',
  					delay: 300,
  			});
  	}else {
  		api.openWin({
  				name: 'login',
  				url: './login.html',
  				delay: 300,
  		});
  	}
  }




   function openWin(name){
        var delay = 0;
        if(api.systemType != 'ios'){
            delay = 300;
        }
        api.openWin({
            name: ''+name+'',
            url: ''+name+'.html',
            bounces:false,
            delay: delay,
            slidBackEnabled:true,
            vScrollBarEnabled:false
        });
    }
   function closeWin(){
        api.closeWin({
        });
    }
</script>
    
    
</html>
